package cn.mooncode.basketballManage.utils;

import cn.mooncode.basketballManage.pojo.User;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @program: basketballManage
 * @description: 当前用户信息
 * @author: jinweizhi
 * @create: 2021-04-06 09:02
 **/

public class UserUtils {

    public static User getUser() {
        return (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
